<?php

//Route::any('/public/upload/upload_file','Public\UploadController@upload_file');

/*后台页面未登录之前*/

use Illuminate\Support\Facades\Auth;
use Intervention\Image\Facades\Image;

Route::get('/admin_system', 'admin_system\LoginController@login_get');//登录页面
Route::post('/admin_system/', 'admin_system\LoginController@login_post');//管理员登录
Route::get('/admin_system/logout', 'admin_system\LoginController@loginout');//退出
Route::any('/admin_system/test/excel_test', 'admin_system\TestController@excel_test');
Route::any('/admin_system/live/all_callback', 'admin_system\LiveController@all_callback');//关闭直播

/*后台页面登录之后*/
$routeOptions = [
    'middleware' => ['checkcookies'],
    'prefix'     => 'admin_system',
    'namespace'  => 'admin_system'
];

Route::group($routeOptions, function () {
    /*首页广告管理*/
    Route::get('/ad/index', "AdController@index");
    Route::any('/ad/add', "AdController@add");
    Route::get('/ad/edit', "AdController@edit");
    Route::get('/ad/delete', "AdController@delete");
    Route::get('/ad/close_or_show', "AdController@close_or_show");


    Route::get('/index', 'indexController@index_get');
    Route::get('/index/welcome', 'indexController@welcome');


    Route::get('user/userList', 'UserController@user_list');
    Route::get('user/editUser/{id}', 'UserController@edit');
    Route::post('user/updateUser', 'UserController@update_user');


    Route::get('/loginout', 'LoginController@loginout');
    Route::post('/delfile', 'BookController@delFile');
    //书籍管理-书籍分类

    Route::get('/books/type/{keyword?}', 'BookController@book_type');
    Route::get('/books/typeAdd', 'BookController@type_create');
    Route::post('/books/typeAdd', 'BookController@type_store');
    Route::get('/books/type/{id}/edit', 'BookController@type_edit');

    

    Route::post('/books/typeDelete', 'BookController@type_delete');
    //书籍管理-书籍列表
    Route::get('/books/index', 'BookController@index');

    //书籍管理-添加书籍
    Route::get('/books/indexAdd', 'BookController@createindex');
    Route::post('/books/indexAdd', 'BookController@storeindex');
    //书籍管理-修改书籍

    Route::get('/books/edit',               'BookController@bookEdit');
    Route::post('/books/edit/{id}',         'BookController@type_update');   //分类编辑

    Route::post('/books/editAction',        'BookController@editAction');
    Route::post('/books/indexDelete',       'BookController@indexdelete');
    Route::any('/books/tags',               'BookController@tags');

    //书籍管理-添加PPT
    Route::post('/books/ppt', 'BookController@storePPT');
    Route::post('/books/pptFileDelete', 'BookController@pptFileDelete');


    //会员管理
    Route::get('/member/index/{keyword?}', 'MemberController@index');
    Route::get('/member/indexTwo/{keyword?}', 'MemberController@indexTwo');
    Route::get('/member/edit', 'MemberController@edit');
    Route::post('/member/editAction', 'MemberController@edit_action');
    Route::post('/member/indexDelete', 'MemberController@indexdelete');

    Route::any('/member/import_member', 'MemberController@import_member');
    Route::any('/member/add_members', 'MemberController@add_members');
    //会员管理-添加会员
    Route::get('/member/indexAdd', 'MemberController@createindex');
    Route::post('/member/indexAdd', 'MemberController@storeindex');

    Route::get('/member/select_member', 'MemberController@select_member');   //选择会员页面
    Route::get('/member/select_member_list', 'MemberController@select_member_list'); //选择会员列表


    /**
     * 分销管理
     */
    Route::get('/memberdrp/indexAdd', 'MemberDRPController@createindex');
    Route::post('/memberdrp/indexAdd', 'MemberDRPController@storeindex');
    Route::get('/memberdrp/index/{keyword?}', 'MemberDRPController@index');
    Route::get('/memberdrp/index/{id}/edit', 'MemberDRPController@indexedit');
    Route::post('/memberdrp/indexedit/{id}', 'MemberDRPController@indexupdate');
    Route::post('/memberdrp/indexDelete', 'MemberDRPController@indexdelete');
    Route::post('/memberdrp/memberInfo', 'MemberDRPController@memberInfo');

    Route::post('/memberdrp/AJAXDeleteSon', 'MemberDRPController@AJAXDeleteSon');//AJAX删除下级会员

    Route::get('/memberdrp/indexAddTwo', 'MemberDRPController@createindexTwo');
    Route::post('/memberdrp/indexAddTwo', 'MemberDRPController@storeindexTwo');
    //添加下线会员
    Route::post('/memberdrp/indexmemdrp', 'MemberDRPController@memberdrpvip');
    /**
     * 海报模板
     */
    Route::get('/poster/indexAdd', 'PosterController@createindex');
    Route::post('/poster/indexAdd', 'PosterController@storeindex');
    Route::get('/poster/index/{keyword?}', 'PosterController@index');
    Route::get('/poster/index/{id}/edit', 'PosterController@indexedit');
    Route::post('/poster/indexedit/{id}', 'PosterController@indexupdate');
    Route::post('/poster/indexDelete', 'PosterController@indexdelete');
    Route::post('/poster/memberInfo', 'PosterController@memberInfo');
    /**
     * 提现管理
     */
    Route::get('/partner/index/{keyword?}', 'PartnerController@index');
    Route::get('/partner/indexTwo/{keyword?}', 'PartnerController@indexTwo');
    Route::get('/partner/indexTree/{keyword?}', 'PartnerController@indexTree');
    Route::get('/partner/index/{id}/edit', 'PartnerController@indexedit');
    Route::post('/partner/indexedit/{id}', 'PartnerController@indexupdate');

    /**
     * 每日一言
     */
    Route::get('/audioDay/index/{keyword?}', 'AudioDayController@index');
    Route::get('/audioDay/indexAdd', 'AudioDayController@createindex');
    Route::post('/audioDay/indexAdd', 'AudioDayController@storeindex');
    Route::get('/audioDay/index/{id}/edit', 'AudioDayController@indexedit');
    Route::post('/audioDay/indexedit/{id}', 'AudioDayController@indexupdate');
    Route::post('/audioDay/indexDelete', 'AudioDayController@indexdelete');
    /**
     * 广告列表
     */
    Route::get('/bookhots/index/{keyword?}', 'BookHotsController@index');
    Route::get('/bookhots/indexAdd', 'BookHotsController@createindex');
    Route::post('/bookhots/indexAdd', 'BookHotsController@storeindex');
    Route::get('/bookhots/index/{id}/edit', 'BookHotsController@indexedit');
    Route::post('/bookhots/indexedit/{id}', 'BookHotsController@indexupdate');
    Route::post('/bookhots/indexDelete', 'BookHotsController@indexdelete');
    /**
     * 推荐书籍
     */
    Route::get('/bookrecommend/index/{keyword?}', 'BookRecommendController@index');
    Route::post('/bookrecommend/indexupdate', 'BookRecommendController@indexupdate');

    /**
     * 心灵分享
     */
    Route::get('/mindshare/index/{keyword?}', 'MindShareController@index');
    Route::get('/mindshare/indexAdd', 'MindShareController@createindex');
    Route::post('/mindshare/indexAdd', 'MindShareController@storeindex');
    Route::get('/mindshare/index/{id}/edit', 'MindShareController@indexedit');
    Route::post('/mindshare/indexedit/{id}', 'MindShareController@indexupdate');
    Route::post('/mindshare/indexDelete', 'MindShareController@indexdelete');
    Route::any('/mindshare/preview/{id}', 'MindShareController@preview');


    Route::any('/mindshare/ajx', 'MindShareController@ajx');


    /**
     * 读书会审核
     */
    Route::any('/readingparty/index', 'ReadingPartyController@index');
    Route::get('/readingparty/index/{id}/edit', 'ReadingPartyController@indexedit');
    Route::post('/readingparty/readpartyEdit', 'ReadingPartyController@readparty_edit');
    Route::post('/readingparty/indexDelete', 'ReadingPartyController@indexdelete');
    Route::post('/readingparty/indexAudit', 'ReadingPartyController@indexaudit');
    Route::any('/readingparty/import_member', 'ReadingPartyController@import_member');
    Route::any('/readingparty/import_member_action', 'ReadingPartyController@import_member_action');
    Route::any('/readingparty/members', 'ReadingPartyController@members');
    Route::any('/readingparty/delete_read_party_member', 'ReadingPartyController@delete_read_party_member');
    Route::any('/readingparty/add_member', 'ReadingPartyController@add_member');
    Route::any('/readingparty/add_single_member_action', 'ReadingPartyController@add_single_member_action');


    /**=========*/

    Route::get('/test_create_qrcode', 'MemberController@test_create_qrcode');
    Route::get('/test_insert_memberInfo', 'MemberDRPController@test_insert_memberInfo');


    /*系统维护功能*/
    Route::get('/system/send_publish_book_message', 'SystemController@send_publish_book_message');
    Route::post('/system/send_publish_book_message_action', 'SystemController@send_publish_book_message_action');


    /*======公司管理====*/
    Route::any('/company/company_list', 'CompanyController@company_list');
    Route::get('/company/company_detail', 'CompanyController@company_detail');
    Route::post('/company/company_update', 'CompanyController@company_update');
    Route::any('/company/delete', 'CompanyController@company_delete');
    Route::post('/company/department_update', 'CompanyController@department_update');
    Route::get('/company/department_delete', 'CompanyController@department_delete');
    Route::any('/company/get_company_info', 'CompanyController@get_company_info');
    Route::any('/company/load_member', 'CompanyController@load_member');
    Route::any('/company/members', 'CompanyController@members');
    Route::any('/company/quit_company', 'CompanyController@quit_company');
    Route::any('company/load_member_action', 'CompanyController@load_member_action');

    /*=====分会管理====*/
    Route::get('/chapter/chapters', 'ChapterController@chapters'); //分会列表
    Route::get('/chapter/chapterEdit', 'ChapterController@chapter_edit');
    Route::any('/chapter/chapterEditAction', 'ChapterController@chapter_edit_action');
    Route::get('/chapter/chapterDelete', 'ChapterController@chapter_delete');
    Route::any('/chapter/getChapterInfo', 'ChapterController@get_chapter_info');

    //分会会长
    Route::get('/chapter/prisidents', 'ChapterController@prisidents');
    Route::get('/chapter/prisidentEditIndex', 'ChapterController@edit_prisident_index');
    Route::any('/chapter/getPrisidentInfo', 'ChapterController@get_prisident_info');
    Route::any('/chapter/updatePrisident', 'ChapterController@update_prisident');
    Route::any('/chapter/prisidentDelete', 'ChapterController@delete_prisident');

    //分会学习官
    Route::get('/chapter/drps', 'ChapterController@officers');
    Route::get('/chapter/officerEdit', 'ChapterController@officer_edit_index');
    Route::any('/chapter/officerEditAction', 'ChapterController@officer_edit_action');
    Route::any('/chapter/getOfficerInfo', 'ChapterController@get_officer_info');
    Route::any('/chapter/officerDelete', 'ChapterController@offecer_delete');
    
    //分会企业
    Route::get('/chapter/companys', 'ChapterController@companys');


    //分会会员
    Route::get('/chapter/members', 'ChapterController@members');


    //分会报单
    Route::get('/chapter/orders', 'ChapterOrderController@orders');
    Route::get('/chapter/orderDetail', 'ChapterOrderController@order_detail');
    Route::any('/chapter/handleOrder', 'ChapterOrderController@handle_order');
    Route::any('/chapter/alipay', 'ChapterOrderController@alipay');
    Route::any('/chapter/orderDelete', 'ChapterOrderController@order_delete'); //删除订单


    /*=======菜单管理====*/
    Route::get('/menu/menu_list',       'MenuController@menu_list');
    Route::get('/menu/edit_menu_index', 'MenuController@menu_edit_index');
    Route::post('/menu/menu_edit',      'MenuController@menu_edit');
    Route::get('/menu/close_or_show',   'MenuController@close_or_show');
    Route::get('/menu/delete_menu',     'MenuController@delete_menu');


    /*=======学习官中心======= */
    Route::get('/study/center', 'StudyCenterController@index');
    Route::get('/study/center/banner', 'StudyCenterController@banner');
    Route::get('/study/center/ajaxSearchResponse', 'StudyCenterController@ajaxSearchResponse');
    Route::any('/study/center/bannerUpload', 'StudyCenterController@bannerUpload')->name('bannerUpload');
    Route::get('/study/center/banner/index', 'StudyCenterController@banner_index')->name('banner_index');//显示banner列表
    Route::get('/study/center/banner/del', 'StudyCenterController@banner_del')->name('bannerDel');//删除banner列表
    Route::post('/study/center/banner/update', 'StudyCenterController@banner_update')->name('banner_update');//更新banner列表
    Route::get('/study/center/banner/update_index', 'StudyCenterController@banner_update_index')->name('banner_update_index');//更新banner列表
    Route::get('/study/center/lessons/list', 'StudyCenterController@lessons_list')->name('lessons_list');//视频列表
    Route::get('/study/center/lessons/del', 'StudyCenterController@lessons_del')->name('lessons_del');//视频删除
    Route::post('/study/center/lessons/save', 'StudyCenterController@lessons_save')->name('lessons_save');//视频修改
    Route::any('/study/center/lessons/lessons_add', 'StudyCenterController@lessons_add')->name('lessons_add');//视频添加

    Route::get('/study/center/lessons/lessons_clo', 'StudyCenterController@lessons_clo')->name('lessons_clo');//学习官中心
    Route::post('/study/center/lessons/lessons_clo_update', 'StudyCenterController@lessons_clo_update')->name('lessons_clo_update');//学习官中心_更新
    Route::get('/study/center/lessons/lessons_clo_show', 'StudyCenterController@lessons_clo_show')->name('lessons_clo_show');//学习官编辑页面
    Route::get('/study/center/lessons/lessons_clo_del', 'StudyCenterController@lessons_clo_del')->name('lessons_clo_del');//学习官中心_删除
    Route::post('/study/center/lessons/lessons_clo_add', 'StudyCenterController@lessons_clo_add')->name('lessons_clo_add');//学习官添加

    //言图
    Route::get('/speak/list', 'SpeakController@index')->name('speakList');

    Route::post('/speak/add', 'SpeakController@addSpeak')->name('addSpeak');

    Route::get('/speak/del/{id}', 'SpeakController@delSpeak')->name('delSpeak');

    Route::get('/speak/edit/{id}', 'SpeakController@editSpeak')->name('editSpeak');
    Route::post('/speak/store', 'SpeakController@storeSpeak')->name('storeSpeak');


    Route::get('/appversion/versions', 'AppVersionController@versions');       //App版本列表
    Route::get('/appversion/edit', 'AppVersionController@edit');           //App版本编辑|添加
    Route::any('/appversion/editAction', 'AppVersionController@edit_action');     //App版本编辑|添加


    //到处读书会成员学习
    Route::get('/readPartyMember', 'ReadingPartyController@upload')->name('partyUpload');

    //学习官通知
    Route::get('/study/center/notice', 'StudyCenterController@notice_list')->name('notice_list');
    Route::get('/study/center/notice_del', 'StudyCenterController@notice_del')->name('notice_del');
    Route::post('/study/center/notice_add', 'StudyCenterController@notice_add')->name('notice_add');
    Route::get('/study/center/notice_show/{id}', 'StudyCenterController@notice_show')->name('notice_show');
    Route::post('/study/center/notice_update/{id}', 'StudyCenterController@notice_update')->name('notice_update');

    //学习官文章的列表
    Route::get('/study/center/article_list', 'StudyCenterController@article_list')->name('article_list');//显示文章的列表
    Route::get('/study/center/article_del/{id}', 'StudyCenterController@article_del')->name('article_del');//删除文章
    Route::get('/study/center/article_add', 'StudyCenterController@article_add')->name('article_add');//添加文章

    Route::post('/study/center/article_save', 'StudyCenterController@article_save')->name('article_save');//保存文章
    Route::get('/study/center/article_edit/{id}', 'StudyCenterController@article_edit')->name('article_edit');//文章的编辑
    Route::post('/study/center/article_edit_save/{id}', 'StudyCenterController@article_edit_save')->name('article_edit_save');//文章的编辑


//        -------------------------------用户的企业管理---------------------------------------------------------
    Route::any('/accountsManage/index', 'AccountsManageController@index');
    Route::get('/accountManage/account_add', 'AccountsManageController@account_add')->name('account_add');
    Route::get('accountManage/base_info', 'AccountsManageController@base_info')->name('account_base_info');
    Route::post('accountManage/base_info/edit', 'AccountsManageController@base_info_edit')->name('account_base_info_edit');
    Route::get('accountManage/son_manage', 'AccountsManageController@son_manage')->name('account_son_manage');
    Route::post('accountManage/son_manage/edit', 'AccountsManageController@son_manage_edit')->name('account_son_manage_edit');


    //直播
    Route::any('/live/add_live', 'LiveController@add_live');     //添加直播
    Route::any('/live/list', 'LiveController@live_list');        //直播列表
    Route::any('/live/edit', 'LiveController@live_edit');        //直播列表
    Route::any('/live/view/{id}', 'LiveController@view_list');        //直播列表

//    Route::any('/live/modify/{member_account}/{role}', 'LiveController@setTimsAdmin');
    Route::any('/live/modify/', 'LiveController@setTimsAdmin');
//    Route::any('/live/speakLimit/{set_account}/{time}', 'LiveController@speak_limit');//禁言
    Route::any('/live/speakLimit/', 'LiveController@speak_limit');//禁言
    Route::any('/live/sendMsg', 'LiveController@sendMsg');//

    Route::any('/live/create_live', 'LiveController@create_chat_room');


    Route::any('/live/page', 'LiveController@create_chat_room');//直播的页面
    Route::any('/live/teacher_phone', 'LiveController@teacher_phone');//主讲管理

    Route::any('/live/msg_view/{id}', 'LiveController@msg_view');//消息管理

    Route::any('/live/user_sig', 'LiveController@user_sig');

    Route::any('/live/send_msg_view/', 'LiveController@send_msg');

    Route::any('/live/send_msg', 'LiveController@send_msg_data');

    Route::any('/live/edit_msg/{id}', 'LiveController@edit_live');
    Route::any('/live/eidt_close', 'LiveController@eidt_close');
    Route::any('/live/test', 'LiveController@push_live');

    Route::any('/live/notf', 'LiveController@change_live');
    Route::any('/live/serch', 'LiveController@serc');//搜索
    Route::any('/live/intr', 'LiveController@intr');//修改群介绍
    Route::any('/live/view_times', 'LiveController@view_times');//修改群观看次数
    Route::any('/live/send_live', 'LiveController@send_live');//是否发布直播

    Route::any('/live/user', 'LiveController@live_user');//在线统治用户人数
    Route::any('/live/sign', 'LiveController@live_strem');//获取直播流的历史记录

    Route::any('/live/get_ali  ', 'LiveController@get_ali');//关闭直播

    //直播控制
    Route::any('/live/close_live/{id}/{type}', 'LiveController@close_live');//关闭直播
    Route::any('/live/open_live/{id}/{type}', 'LiveController@open_live');//关闭直播
    Route::any('/live/recall/message', 'LiveController@group_msg_recall');//消息撤回
    Route::any('/live/show_live/{id}/{type}', 'LiveController@show_live');//消息撤回

    Route::any('/live/dirty_words_list_get', 'LiveController@dirty_words_list_get');//获取脏字管理
    Route::any('/live/dirty_words_list_add', 'LiveController@dirty_words_list_add');//获取脏字管理


    Route::any('/live/strem', 'LiveController@DescribeLiveStreamsPublishList');
    Route::any('/live/online_num', 'LiveController@live_stream_Online_user_num');//统计在线人数

    //直播礼物
    Route::any('/live/gift/manage', 'LiveController@live_gift_manage');
    //添加礼物
    Route::any('/live/gift/add', 'LiveController@live_gift_add');
    Route::any('/live/gift/save', 'LiveController@live_gift_save');
    Route::any('/live/gift/del/{id}', 'LiveController@del_gift');
    Route::any('/live/gift/edit/{id}', 'LiveController@edit_gift');
    Route::any('/live/gift/edit/{id}/save', 'LiveController@edit_gift_save');
    Route::any('/live/gift/group_notice', 'LiveController@send_group_system_notification');//群通知

//    Route::any('/live/test', 'LiveController@modify_add_er');

    //连接编辑管理
    Route::any('/live/link/eidt/{type}/{id}', 'LiveController@live_link_edit');
    Route::any('/live/link/live_link_edit_add', 'LiveController@live_link_edit_add');
    Route::any('/live/link/del/{id}', 'LiveController@live_link_del');//删除连接


    //直播连接管理
    Route::any('/share/link_mange', 'LiveController@link_manage');//直播链接管理

    Route::any('/share/add_link/{type}', 'LiveController@add_link');//添加直播链接管理

    Route::any('/share/add_link', 'LiveController@save_link');//保存直播管理

    Route::any('/live/editor/img', 'LiveController@live_editor_img');//编辑器图片上传



    Route::any('/order/{action}','OrderController@action');



    //666项目
    Route::any('/666active/enter', 'Zhongchou666Controller@enter');

    //统计功能
    Route::any('/count/enter', 'CountController@enter');


    Route::any('/wxedit/{action}', 'EditController@action');
    


});
